<!DOCTYPE html>
<html lang="en">
<head>
    <title>新增测试安装包</title>
    <link href="../bootstrap/dist/css/bootstrap.min.css" rel="stylesheet">
    <script src="http://cdn.bootcss.com/jquery/2.1.1/jquery.min.js"></script>
    <script src="../bootstrap/dist/js/bootstrap.min.js"></script>
    <script src="../js/My97DatePicker/WdatePicker.js"></script>
    <link href="../js/My97DatePicker/skin/WdatePicker.css">
    <!-- Latest compiled and minified CSS -->
    <link rel="stylesheet" href="../js/bootstrap-select/dist/css/bootstrap-select.min.css">

    <!-- Latest compiled and minified JavaScript -->
    <script src="../js/bootstrap-select/js/bootstrap-select.js"></script>

    <!-- (Optional) Latest compiled and minified JavaScript translation files -->
    <script src="../js/bootstrap-select/dist/js/i18n/defaults-*.min.js"></script>
</head>
<head>

    <meta charset="UTF-8">
    <title>新增测试安装包信息</title>
    <style>
        #main-nav {
            margin-left: 1px;
        }

        #main-nav.nav-tabs.nav-stacked > li > a {
            padding: 10px 8px;
            font-size: 12px;
            font-weight: 600;
            color: #4A515B;
            background: #E9E9E9;
            background: -moz-linear-gradient(top, #FAFAFA 0%, #E9E9E9 100%);
            background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#FAFAFA), color-stop(100%,#E9E9E9));
            background: -webkit-linear-gradient(top, #FAFAFA 0%,#E9E9E9 100%);
            background: -o-linear-gradient(top, #FAFAFA 0%,#E9E9E9 100%);
            background: -ms-linear-gradient(top, #FAFAFA 0%,#E9E9E9 100%);
            background: linear-gradient(top, #FAFAFA 0%,#E9E9E9 100%);
            filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#FAFAFA', endColorstr='#E9E9E9');
            -ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorstr='#FAFAFA', endColorstr='#E9E9E9')";
            border: 1px solid #D5D5D5;
            border-radius: 4px;
        }

        #main-nav.nav-tabs.nav-stacked > li > a > span {
            color: #4A515B;
        }

        #main-nav.nav-tabs.nav-stacked > li.active > a, #main-nav.nav-tabs.nav-stacked > li > a:hover {
            color: #FFF;
            background: #3C4049;
            background: -moz-linear-gradient(top, #4A515B 0%, #3C4049 100%);
            background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#4A515B), color-stop(100%,#3C4049));
            background: -webkit-linear-gradient(top, #4A515B 0%,#3C4049 100%);
            background: -o-linear-gradient(top, #4A515B 0%,#3C4049 100%);
            background: -ms-linear-gradient(top, #4A515B 0%,#3C4049 100%);
            background: linear-gradient(top, #4A515B 0%,#3C4049 100%);
            filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#4A515B', endColorstr='#3C4049');
            -ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorstr='#4A515B', endColorstr='#3C4049')";
            border-color: #2B2E33;
        }

        #main-nav.nav-tabs.nav-stacked > li.active > a, #main-nav.nav-tabs.nav-stacked > li > a:hover > span {
            color: #FFF;
        }

        #main-nav.nav-tabs.nav-stacked > li {
            margin-bottom: 4px;
        }

        /*定义二级菜单样式*/
        .secondmenu a {
            font-size: 10px;
            color: #4A515B;
            text-align: center;
        }

        .navbar-static-top {
            background-color: #212121;
            margin-bottom: 5px;
        }

        .navbar-brand {
            background: url('') no-repeat 10px 8px;
            display: inline-block;
            vertical-align: middle;
            padding-left: 50px;
            color: #fff;
        }
    </style>

</head>
<body>
<div class="navbar navbar-duomi navbar-static-top" role="navigation">
    <div class="container-fluid">
        <div class="navbar-header">
            <a class="navbar-brand" href="" id="logo">借用记录
            </a>
        </div>
    </div>
</div>
<div class="container" style="display: block; width: 576px; left: 352px; top: 124px; z-index: 9005;">
    <form role="form" name="borrowInfo" method="post" action="/device/borrowDevice" onsubmit="return checkDevice();" >
        <input type="hidden" class="form-control" id="deviceID" name="deviceID" readonly="readonly"
               value=${device.id}>
        <div class="form-group">
            <label for="deviceName">设备名称:</label>
            <input type="text" class="form-control" id="deviceName" name="deviceName" readonly="readonly"
                   value=${device.device_name}>
        </div>
        <div class="form-group">
            <label for="borrower">借用人:</label>
            <input type="text" class="form-control" id="borrower" name="borrower"
                   placeholder="借用人">
        </div>
        <label for="startTime">归还日期:</label>
        <input class="form-control" name="startTime" id="startTime" value="2016-04-21 23:14:01" onclick="WdatePicker({readOnly:true,dateFmt:'yyyy-MM-dd HH:mm:ss'})">
        <div class="text-right">
            <button type="submit" class="btn btn-success">提交</button>
            <button type="button" class="btn btn-warning" onclick ="location.href='searchDevice'">返回</button>
            <button type="reset" class="btn btn-danger">重置</button>
        </div>
    </form>
</div>
</div>
</body>

<script>
    function checkDevice(){
        var name = document.getElementById("package_name").value;
        var borrower = document.getElementById("borrower").value;
        var download = document.getElementById("download_URL").value;
        if(name == ""  ){
            alert("安装包名不能为空");
            return false;
        }
        if(borrower == ""  ){
            alert("借用人不能为空");
            return false;
        }
        else{
            return true;
        }
    }
</script>
</html>
